<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>弹性布局</title>
    <style>
    ul,li{
        margin: 0px;
        padding: 0px;
        list-style: none;
    }
    .list{
        width: 1200px;
        height: 600px;
        margin: 0 auto;
        border: 1px solid hotpink;
        /* 设置弹性布局 */
        display: flex;
        /* 设置主轴 */
        flex-direction: column;
        flex-direction: row;
        /* 设置主轴对齐方式 */
        justify-content: space-between;
        /* 设置交叉轴对齐方向 */
        align-content: space-evenly;
        /* 设置是否换行 */
        flex-wrap: wrap;
    }
    .list li{
        width: 200px;
        height: 200px;
        background: palevioletred;
    }
    .flex-bottom {align-self: flex-end;}
    </style>
</head>
<body>
    <ul class="list">
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
        <li>6</li>
        <li>7</li>
        <li>8</li>
    </ul>
</body>
</html>